using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using Customer;
using Microsoft.CSharp;

namespace WindowsFormsApplication1
{
    public partial class ThankYouForm : Form
    {
        string cardNum;
        Person person;
        BitArray status;
        
        public ThankYouForm(Person Person, string Order, BitArray Status)
        {
            person = Person;
            cardNum = person.CardNumber;
            status = Status;
            InitializeComponent();
            thankYouText.Text = Order;
        }

        public void orderAgain_Click(object sender, EventArgs e)
        {           
            TypeSelection typeSelection = new TypeSelection(person, status);
            typeSelection.ShowDialog();
            this.Close();
        }

        public void checkoutButton_Click(object sender, EventArgs e)
        {
            // Get name from textbox
            string track = person.CardNumber;
            // Check if customer has a record, if not create one
            
            // Arbitrary charge amount
            decimal charge = person.SessionTotal;
            // Add charge to total           

            person.CardNumber = " ";
            person.SessionTotal = 0;

            this.Close();
        }

    }
}
